home *** CD-ROM | disk | FTP | other *** search
- { %filename% -- application methods }
- { Created %date% %time% by AppMaker }
-
- { This module overrides the AppMaker-generated code in z%Appname%App.% %}
- { It provides a place for you to add your own code and still be able to }
- { generate code for new changes to the user interface. This module will }
- { not be regenerated by AppMaker unless you delete it. Its superclass, }
- { z%Appname%App, may be regenerated to handle user interface changes% %}
- { without losing your hand-coded changes to this module. }
-
- Unit %unitname%;
- Interface
-
- Uses
- TCL,
- AMCL,
- %AppName%Intf,
- ResourceDefs;
-
- {----------}
- Implementation
-
- {----------}
- Procedure C%Appname%App.I%Appname%App;
- Begin
- inherited I%Appname%App;
-
- {your application-specific initialization:}
-
- End; {I%Appname%App}
-
- {----------}
- Procedure C%Appname%App.SetUpFileParameters;
- Begin
- inherited SetUpFileParameters;
- sfNumTypes := 1;
- sfFileTypes [0] := kFileType;
- gSignature := kSignature;
- End; {SetUpFileParameters}
-
- {----------}
- Procedure C%Appname%App.UpdateMenus;
- Begin
- inherited UpdateMenus;
- %for each menu gen updateAppMenus%
-
- End; {UpdateMenus}
-
- {----------}
- Procedure C%Appname%App.DoCommand (theCommand: longint);
- var
- theMenu: integer;
- theItem: integer;
- theItemText: Str255;
- Begin
- if theCommand < 0 then begin {menu generated dynamically}
- theMenu := HiWord (-theCommand);
- if theMenu = MENUapple then begin
- inherited DoCommand (theCommand); {handle Apple menu in superclass}
- end else begin
- theItem := LoWord (-theCommand);
- GetItem (GetMHandle (theMenu), theItem, theItemText);
- {do the right thing with the text of the item}
- end;
- end else begin
- case theCommand of
- 0: ;
- %for each menu gen handleAppItems%
-
- otherwise
- inherited DoCommand (theCommand);
- end; {case}
- end;
- End; {DoCommand}
-
- End. {%unitname%}
-